﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Csharp_day2
{
    class Program
    {
        static void Main(string[] args)
        {
            Person p1 = new Person();
            p1.FullName = "JayZ";
            p1.Age = 21;
            p1.GetUserDetails();

            Person p2 = new Person(333);
            p2.FullName = "JackDorsey";
            p2.FavColor = "Blue";
            p2.GetUserDetails();

            Employee e1 = new Employee();
            e1.FullName = "BigBird";
            e1.Salary = 75000;
            e1.GetUserDetails();

            Cutter cookie1 = new Cutter();
            cookie1.Flavor = "Chocolate Chips";

            // static
            //DataContainer dc = new DataContainer()// does not work
            int myMax = DataContainer.GetCapacity();

            Console.ReadLine();
        }
    }
    // Person Class
    public class Person
    {
        // accesor & mutator
        // getter & setter
        public string FullName { get; set; }
        public int Age { get; set; }
        //private int Age { get; set; }

        public virtual string FavColor { get; set; }
        public virtual void GetUserDetails()
        {
            // some biz logic
            Console.WriteLine("{0}'s age is {1}, and their favorite color is {2}.", this.FullName, this.Age, this.FavColor );
        }
        // Overloading... multiple options for a constructor
        // Constructor with 1 argument...
        public Person(int customAge)
        {
            this.Age = customAge;
        }
        // Constructor with 0 argument...
        public Person() { }
    }


    // Employee Class > Inheritence from Person
    public class Employee : Person
    {
        public int Salary { get; set; }
        // constructor
        public Employee(): base(5000) { }

     
        // override the method in base class
        public override void GetUserDetails()
        {
            //base.GetUserDetails();
            Console.WriteLine("{0} has a salary of {1}.", this.FullName, this.Salary);
        }


    }
    class Cutter
    {
        public string Flavor { get; set; }
    }

    // static
    public static class DataContainer {
        private static int maxCapicity = 10;
        public static int GetCapacity()
        {
            return 10;
        }
    }


    ///  /namespace
}
